//
//  QuotaAnalysisView.h
//  cocoapodText
//
//  Created by apple on 16/9/10.
//  Copyright © 2016年 apple. All rights reserved.
//

#ifndef QuotaAnalysisView_h
#define QuotaAnalysisView_h


#endif /* QuotaAnalysisView_h */
#import "CommonTool.h"
//导入时需要手动打上，系统没有提示
#import "Charts-Swift.h"
#import "NirKxMenu.h"
#import <UIKit/UIKit.h>
#import "queryDataInfo.h"
#import "MyUIDatePicker.h"
#import "areaTableRadioCell.h"
#import "queryDataQATableCell.h"
#import "queryDataQATableCellView.h"

@class QuotaAnalysisView;

//一个协议可以扩展另一个协议，例如FSLoginViewDelegate扩展了NSObject协议
@protocol GYQuotaAnalysisViewDelegate <NSObject>

@required //@required修饰的方法必须实现
-(void)onSetData:(QuotaAnalysisView *)quotaAnalysisView;
-(void)onInitFristChartTableData:(QuotaAnalysisView*)quotaAnalysisView esCode:(NSString *)esCode;
-(void)onQueryChartData:(QuotaAnalysisView*)quotaAnalysisView esCode:(NSString *)esCode xslx:(NSString *)xslx startTime:(NSString *)startTime endTine:(NSString *)endTime orgid:(NSString *)orgid structType:(NSString *)structType;
@end

@interface QuotaAnalysisView : UIView<ChartViewDelegate>
//全局背景
@property(nonatomic,strong)UIView *AllBackView;
//左侧菜单
@property(nonatomic,strong)UITableView *GYMeunTableView;
///右侧查询
//右侧全背景
@property(nonatomic,strong)UIView *rightAllBackView;
//右侧滑动背景
@property(nonatomic,strong)UIScrollView *chartAndQueryTableBack;
//表格
@property(nonatomic,strong)UITableView *queryTableView;
//表格头部
@property(nonatomic,strong)UIView *queryTabletopView;
@property(nonatomic,strong)queryDataQATableCellView *tableCellView;
//表格横向滑动
@property(nonatomic,strong)UIScrollView *queryTableBack;
//时间选择
@property(nonatomic,strong)MyUIDatePicker *datePicker;
@property(nonatomic)BOOL is_picker_show;
@property(nonatomic,strong)UIView *pickerOverlay;
//折线图
@property(nonatomic,strong)UILabel *chartTitle;
@property(nonatomic,strong)LineChartView *energyLineChart;
#pragma mark 折线图数据
@property(nonatomic,retain)NSMutableArray *xValsEnergyLine;
@property(nonatomic,retain)NSMutableArray *yValsEnergyLine;
@property(nonatomic,retain)NSMutableArray *lineColors;
@property(nonatomic,retain)NSString *title;

@property(nonatomic,strong)UILabel *energyTypeMenu;
@property(nonatomic,strong)UILabel *showTypeMenu;
@property(nonatomic,strong)UILabel *startTimeMenu;
@property(nonatomic,strong)UILabel *endTimeMenu;

//当前设置类型
@property(nonatomic,retain)NSString *currentType;
/**
 * energyType 能源类型
 * xslxType 显示类型
 * startTime 开始时间
 * endTime 结束时间
 */
//能源类型
@property(nonatomic,retain)NSString *energyType;
//选中的地区
@property(nonatomic,retain)NSString *currentAreaName;
//年份
@property(nonatomic,retain)NSString *startTime;
//年份
@property(nonatomic,retain)NSString *endTime;
//类型
@property(nonatomic,retain)NSString *xslxType;
//ID
@property(nonatomic,retain)NSString *orgId;

#pragma mark - 属性
#pragma mark 代理属性，同时约定作为代理的对象必须实现KCButtonDelegate协议
@property (nonatomic,retain) id<GYQuotaAnalysisViewDelegate> delegate;

#pragma mark - 公共方法
-(void)setData;
-(void)multipleLineChartDataWithLegend:(NSArray *)legend;
-(void)setGYMenuEnergyTypeData:(NSArray *)array;
-(void)setGYMenuTableData:(NSArray *)array;
-(void)setEnergyTableWithxAxis:(NSArray *)xAxis yAxiss:(NSArray *)yAxiss legend:(NSArray *)legend;
-(void)setInitCondition;
-(void)dismissMenu;

@end
